package com.geekgo.ladder.core.base;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 * @author geekgo
 * @version 2016/12/19 18:04
 */
@SuppressWarnings("serial")
public abstract class BaseModel implements Serializable {

    @TableId(value = "id_",type = IdType.ID_WORKER)
    protected Long id;
    @TableField("enable_")
    private Boolean enable;
    @TableField("remark_")
    private String remark;
    @TableField("create_by")
    private Long createBy;
    @TableField("create_time")
    private Date createTime;
    @TableField("update_by")
    private Long updateBy;
    @TableField("update_time")
    private Date updateTime;

    protected abstract Serializable pkVal();

    public Long getId() {
        return id;
    }

    public String getId_(){ return id == null ? "" : id.toString(); }

    public void setId(Long id) {
        this.id = id;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Long getCreateBy() {
        return createBy;
    }

    public void setCreateBy(Long createBy) {
        this.createBy = createBy;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(Long updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}
